<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import HouseDetails from "@/pages/house/components/houseDetails.vue";
import { houseSearchService } from "@/api/house";
import HouseMap from "@/pages/house/components/HouseMap.vue";
import HouseBottom from "@/pages/house/components/HouseBottom.vue";
import HouseContact from "@/pages/house/components/HouseContact.vue";
const houseId = ref(null);
const house = ref({});

onLoad(async (options) => {
  // 接收navigator路径传参
  houseId.value = options.house;
  const res = await houseSearchService(houseId.value);
  house.value = res.data;
});
</script>

<template>
  <!-- 房屋细节   -->
  <HouseDetails :house="house" />
  <!-- 地图 -->
  <HouseMap :name="house.name" />
  <!-- 底部 -->
  <HouseBottom />
  <!-- 联系人 -->
  <HouseContact />
</template>

<style scoped lang="scss"></style>
